﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PlayerTest.Player.Event
{
    public class ControlEventArgs : EventArgs
    {
        public enum eventtype
        {
            ERROR,
            CURRENTPOS,
            MAXPOS,
            VOLUME,
            LOGIN,
            UPDATESECTION,
            UPDATESCRIPT,
            UPDATESTUDYINFO,
            SUBOPENERROR,
            JOIN
        };
        private String message;
        private int val;
        private double doubleValue;
        private bool result;

        private eventtype event_type;

        public ControlEventArgs(eventtype type)
        {
            this.event_type = type;
            message = "";
            val = 0;
            result = false;
        }

        public bool Result
        {
            get { return result; }
            set { result = value; }
        }
        public int IntValue
        {
            get { return val; }
            set { val = value; }
        }
        public double DoubleValue
        {
            get { return doubleValue; }
            set { doubleValue = value; }
        }
        public String Message
        {
            get { return message; }
            set { message = value; }
        }
        public eventtype EventType
        {
            get { return event_type; }
            set { event_type = value; }
        }
    }

    public delegate void ControlEventHandler(object sender, ControlEventArgs e);
}
